package controllers;

import com.avaje.ebean.Ebean;
import models.menu.Menu;
import play.Play;
import play.libs.Yaml;
import play.mvc.Action;
import play.mvc.Http;
import play.mvc.Result;

import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * Created by Gipxy group
 * Date: 4/22/12
 */
public class MenuController extends Action.Simple{
    public Result call(Http.Context ctx) throws Throwable {
        ctx.args.put("menus", Menu.find.all());
        return delegate.call(ctx);
    }

    public static List<Menu> current() {
        return (List<Menu>)Http.Context.current().args.get("menus");
    }
}
